home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Borland / Borland C++ V5.02 / OWLINC.PAK / INPUTDIA.H < prev    next >
C/C++ Source or Header  |  1997-05-06  |  2KB  |  107 lines

  1. //----------------------------------------------------------------------------
  2. // ObjectWindows
  3. // Copyright (c) 1991, 1997 by Borland International, All Rights Reserved
  4. //
  5. //$Revision:   10.4  $
  6. //
  7. // Definition of TInputDialog class
  8. //----------------------------------------------------------------------------
  9. #if !defined(OWL_INPUTDIA_H)
  10. #define OWL_INPUTDIA_H
  11.  
  12. #if !defined(OWL_DIALOG_H)
  13. # include <owl/dialog.h>
  14. #endif
  15. #include <owl/inputdia.rh>
  16.  
  17. #if defined(BI_NAMESPACE)
  18. namespace OWL {
  19. #endif
  20.  
  21. // Generic definitions/compiler options (eg. alignment) preceeding the 
  22. // definition of classes
  23. #include <services/preclass.h>
  24.  
  25. class _OWLCLASS TValidator;
  26.  
  27. //
  28. // class TInputDialog
  29. // ~~~~~ ~~~~~~~~~~~~
  30. class _OWLCLASS TInputDialog : public TDialog {
  31.   public:
  32.     TInputDialog(TWindow*        parent,
  33.                  const char far* title,
  34.                  const char far* prompt,
  35.                  char far*       buffer,
  36.                  int             bufferSize,
  37.                  TModule*        module = 0,
  38.                  TValidator*     valid = 0);  // Optional validator
  39.  
  40.    ~TInputDialog();
  41.  
  42.     // Override TWindow virtual member functions
  43.     //
  44.     void TransferData(TTransferDirection);
  45.  
  46.     const char far* GetPrompt() const;
  47.     const char far* GetBuffer() const;
  48.     int             GetBufferSize() const;
  49.  
  50.   protected:
  51.     // Override TWindow virtual member functions
  52.     //
  53.     void SetupWindow();
  54.  
  55.   public_data:
  56.     char far* Prompt;
  57.     char far* Buffer;
  58.     int       BufferSize;
  59.  
  60.   private:
  61.     // Hidden to prevent accidental copying or assignment
  62.     //
  63.     TInputDialog(const TInputDialog&);
  64.     TInputDialog& operator=(const TInputDialog&);
  65.  
  66.   DECLARE_STREAMABLE(_OWLCLASS, TInputDialog, 1);
  67. };
  68.  
  69. // Generic definitions/compiler options (eg. alignment) following the 
  70. // definition of classes
  71. #include <services/posclass.h>
  72.  
  73. #if defined(BI_NAMESPACE)
  74. } // namespace OWL
  75. #endif
  76.  
  77. //----------------------------------------------------------------------------
  78. // Inline implementations
  79. //
  80.  
  81. //
  82. // Return the prompt for the dialog.
  83. //
  84. inline const char far* TInputDialog::GetPrompt() const
  85. {
  86.   return Prompt;
  87. }
  88.  
  89. //
  90. // Return the buffer.
  91. //
  92. inline const char far* TInputDialog::GetBuffer() const
  93. {
  94.   return Buffer;
  95. }
  96.  
  97. //
  98. // Return the size of the buffer.
  99. //
  100. inline int TInputDialog::GetBufferSize() const
  101. {
  102.   return BufferSize;
  103. }
  104.  
  105.  
  106. #endif  // OWL_INPUTDIA_H
  107.